<?php
/**
 * Functions related to the theme.
 *
 *
 * @package WordPress
 * @subpackage Golibri
 */
 
/**
 * HEADER CALL
 */
if ( !is_admin() ) ns_header(); 
/**
 * enque scripts in the theme
 *
 * @since Twenty Eleven 1.0
 */
function ns_header() 
{
	global $CURRENT_PAGE;
	
	wp_enqueue_script("jquery");
	
	wp_enqueue_script("amawal_cufon", get_bloginfo( 'template_directory' ).'/js/cufon-yui.js'); 
	wp_enqueue_script("amawal_Diavlo", get_bloginfo( 'template_directory' ).'/js/Museo_500_400.font.js');
		 
	switch( $CURRENT_PAGE ):
		case 'add_new':					
			ns_enque_validator();			 
        break;
		   
    endswitch;
	
	wp_enqueue_script("amawal_main", get_bloginfo( 'template_directory' ).'/js/amawal.js'); 

}


//form validation engine
function ns_enque_validator()
{		
	wp_enqueue_script("jquery.validationEngine-l", get_bloginfo( 'template_directory' ).'/js/validatior/languages/jquery.validationEngine-en.js');
	wp_enqueue_script("jquery.validationEngine", get_bloginfo( 'template_directory' ).'/js/validatior/jquery.validationEngine.js');
	wp_register_style('validationEngine.jquery', get_bloginfo( 'template_directory' ).'/js/validatior/css/validationEngine.jquery.css');
	wp_enqueue_style( 'validationEngine.jquery');
	wp_register_style('validationEngine.template', get_bloginfo( 'template_directory' ).'/js/validatior/css/template.css');
	wp_enqueue_style( 'validationEngine.template');
}
